//
//  MainBottomView.m
//  吃货·上海
//
//  Created by 濮亚军 on 15/11/24.
//  Copyright © 2015年 濮亚军. All rights reserved.
//

#import "MainBottomView.h"


@interface MainBottomView()



@end



@implementation MainBottomView
-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self)
    {
        UILabel *lineLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, 1)];
        lineLabel.backgroundColor = [UIColor blackColor];
        [self addSubview:lineLabel];
        
        CGFloat width = frame.size.width / 5;
        CGFloat height = frame.size.height;
        self.menuButtonView = [[ButtonView alloc]initWithFrame:CGRectMake(0, 0, width, height) iamge:[UIImage imageNamed:@"Menu"] title:@"菜谱"];
        //self.menuButtonView.backgroundColor = [UIColor orangeColor];
        [self addSubview:_menuButtonView];
        
        self.communityButtonView = [[ButtonView alloc]initWithFrame:CGRectMake(width, 0, width, height) iamge:[UIImage imageNamed:@"community"] title:@"吃货圈"];
        //self.communityButtonView.backgroundColor = [UIColor orangeColor];
        [self addSubview:_communityButtonView];
        
        self.cameraButtonView = [[UIView alloc]initWithFrame:CGRectMake(2 * width, 0, width, height)];
        UIImageView *cView = [[UIImageView alloc]initWithFrame:CGRectMake((width - height) / 2, 0, height, height)];
        //cView.backgroundColor = [UIColor redColor];
        cView.image = [UIImage imageNamed:@"camera"];
        [cView.layer setCornerRadius:height / 2];
        [self.cameraButtonView addSubview:cView];
        [self addSubview:_cameraButtonView];
        
        
        
        self.dailyButtonView = [[ButtonView alloc]initWithFrame:CGRectMake(3 * width, 0, width, height) iamge:[UIImage imageNamed:@"daily"] title:@"吃点心"];
        //self.dailyButtonView.backgroundColor = [UIColor orangeColor];
        [self addSubview:_dailyButtonView];
        
        self.mineButtonView = [[ButtonView alloc]initWithFrame:CGRectMake(width * 4, 0, width, height) iamge:[UIImage imageNamed:@"mine"] title:@"我的"];
        //self.mineButtonView.backgroundColor = [UIColor orangeColor];
        [self addSubview:_mineButtonView];
        
    }
    return self;
}





@end
